<ui:composition template="/WEB-INF/templates/main-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="sidebar">
	<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
	<h:outputText value="Asset Request" styleClass="outputTextTitle" />
   <h:form>		
		 <p:panel header="View Asset Request">            
             
             <h:panelGrid >
	             <p:dataTable paginator="true" rows="25" id="assetrequest" value="#{assetRequestsBean.assetRequestList}" var="assetrequest" >  
	  
		            
		            <p:column headerText="S.No"> 
		                <h:outputText value="#{assetrequest.sno}" />
		            </p:column>  
		            
		            <p:column headerText="Asset Code"> 
		                <h:outputText value="#{assetrequest.assetReferenceCode}" />
		            </p:column>  
		  
		            <p:column headerText="Request Date"> 
		               <h:outputText value="#{assetrequest.requestDate}" >
		               	<f:convertDateTime pattern="dd-MMM-yyyy HH:mm a"/>
		               </h:outputText>			             
		            </p:column> 
		            
		            <p:column headerText="Recommender Status"> 
		                <h:outputText value="#{assetrequest.recommenderStatus}"/>
		            </p:column> 
		             
		            <p:column headerText="Approver Status">  
		                <h:outputText value="#{assetrequest.approverStatus}" />  
		            </p:column>  
		        
		            <p:column headerText="View" >  
		                <p:commandButton action="#{assetRequestsBean.viewAssetRequestAction}" value="View" >			
							<f:param id="assetCode" name="assetCode" value="#{assetrequest.assetReferenceCode}" />
						</p:commandButton>
		            </p:column>
		          
	            </p:dataTable>  
	            
	           
             </h:panelGrid>
         </p:panel>
		</h:form>
	</ui:define>
</ui:composition>